package cz.cvut.fit.web.nakupniSeznam.ws;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cz.cvut.fit.web.nakupniSeznam.constants.WSConstants;

@Path("/keepAlive")
public class KeepAlive {
	private static final Logger LOG = LoggerFactory.getLogger(KeepAlive.class);
	private static final String RESULT_BODY = "keep alive";
	
	@GET
	@Produces("text/plain")
	public Response getText() {
		Response.ResponseBuilder builder = Response.status(Response.Status.OK);
		builder.entity(KeepAlive.RESULT_BODY);
		LOG.debug(WSConstants.LOG_KEEP_ALIVE);
		return builder.build();
	}

}
